package com.itheima.config;

import com.itheima.interceptor.Tokenterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration

public class StringMvcSupport extends WebMvcConfigurationSupport {

    @Autowired
    private Tokenterceptor tokenterceptor;
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        // registry注册表
       registry.addInterceptor(tokenterceptor)
               .addPathPatterns("/**")
               .excludePathPatterns("/employee/login","/common/upload");
    }
}
